package homework;
import java.io.*;
import java.util.Scanner;

import jxl.write.*;
import jxl.*;


public class Account {
	
	static Scanner scanner = new Scanner(System.in);
	public static String accountName;
	public static int income;
	public static String incomeString;
	public static int expense;
	public static String ecpenseString;
	//sdkjfhkjdsahfkjdsaf
	//aksdjflkdjfgggggggggggggggggg
	public static void Account(){
		try{
			
			accountName = scanner.nextLine();
	        WritableWorkbook workbook = Workbook.createWorkbook(new File(accountName+".xls"));
	        WritableSheet sheet = workbook.createSheet("Money", 0);
	         
	      /*WritableFont myFont = new WritableFont(jxl.write.WritableFont.ARIAL, 14);        
	                 
	      WritableCellFormat cellFormat = new WritableCellFormat();
	           
	      cellFormat.setFont(myFont); // ��w�r��
	            cellFormat.setBackground(Colour.LIGHT_BLUE); // �I���C��
	       cellFormat.setAlignment(Alignment.CENTRE); // ����覡  */
	        income = scanner.nextInt();
	        incomeString = Integer.toString(income);
	        Label label = new Label(0, 0, incomeString);
	        
	        sheet.addCell(label);
	        workbook.write(); 
	        workbook.close();
	        
	    } 
		catch (IOException e1) {
	         e1.printStackTrace();
	    } 
		catch (WriteException e) {
	        e.printStackTrace();
	     }
	

	}
	
}
